//获取应用实例
const app = getApp()
const util = require("../../utils/util.js");
Page({
    data: {
        messageList: [],
        citycode: "",
    },
    onLoad: function() {
        util.getUrl(app.globalData.url).then((res) => {
            this.setData({
                citycode: wx.getStorageSync("citycode") ? wx.getStorageSync("citycode") : 'sz',
            })
            util.request('phb.php', {
                citycode: wx.getStorageSync("citycode") ? wx.getStorageSync("citycode") : 'sz',
            }, "GET").then(res => {
                if (res.data && res.data.length) {
                    this.setData({
                        messageList: res.data.splice(0, 20),
                    });
                }
            });
        });
    },
    onShareAppMessage() {},
    onShareTimeline() {},
});